package link.hwx.service.u9.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import link.hwx.mapper.u9.PurchaseOrderMapper;
import link.hwx.service.u9.PurchaseOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@DS("SrmData")
@Service
public class PurchaseOrderServiceImpl implements PurchaseOrderService {
    @Autowired
    private PurchaseOrderMapper purchaseOrderMapper;

    @Override
    public List<Map<String, String>> selectColumnsHead() {
        return purchaseOrderMapper.selectColumnsHead();
    }

    @Override
    public List<Map<String, String>> selectColumnsLine() {
        return purchaseOrderMapper.selectColumnsLine();
    }

    @Override
    public Map<String, String> selectPoHeadById(String docNo) {
        return purchaseOrderMapper.selectPoHeadById(docNo);
    }

    @Override
    public List<Map<String, String>> selectPoLineById(String docNo) {
        return purchaseOrderMapper.selectPoLineById(docNo);
    }

    @Override
    public int updateDescFlexFieldPub2ByDocNo(String status, String docNo) {
        return purchaseOrderMapper.updateDescFlexFieldPub2ByDocNo(status, docNo);
    }

    @Override
    public int updatePoStatusByDocNo(String status, String docNo) {
        return purchaseOrderMapper.updatePoStatusByDocNo(status, docNo);
    }

    @Override
    public Map<String, Object> findPurchaseOrderByDocNo(String docNo) {
        return purchaseOrderMapper.findPurchaseOrderByDocNo(docNo);
    }

    @Override
    public int updatePoLineStatusByPoId(String status, String poId) {
        return purchaseOrderMapper.updatePoLineStatusByPoId(status, poId);
    }

    @Override
    public int updatePoShipLineStatusByPoId(String status, String poId) {
        return purchaseOrderMapper.updatePoShipLineStatusByPoId(status, poId);
    }
}
